{% extends '_base.html' %}

{% block title %}{{ _('Home') }}{% endblock %}

{% block head %}
    {% set __sidebar_right__ = true %}

<style>
.x-index-visible {
    display: block;
}
</style>

{% endblock %}

{% block content %}
    <h3>{{ _('Hot Articles') }}</h3>
    <div style="max-width:640px;" class="uk-slidenav-position" data-uk-slideshow="{autoplay:true,pauseOnHover:false,kenburns:true}">
        <ul class="uk-slideshow uk-overlay-active">
            {% for a in hotArticles %}
            <li>
                <img src="/files/attachments/{{ a.cover_id }}/l" width="640" height="360">
                <div onclick="window.open('/article/{{ a.id }}')" style="cursor:pointer" class="uk-overlay-panel uk-overlay-background uk-overlay-bottom uk-overlay-slide-bottom">
                    <h3>{{ a.name }}</h3>
                    <p>{{ a.description }}</p>
                </div>
            </li>
            {% endfor %}
        </ul>
        <a href="#0" class="uk-slidenav uk-slidenav-contrast uk-slidenav-previous" data-uk-slideshow-item="previous" style="color: rgba(255,255,255,0.4)"></a>
        <a href="#0" class="uk-slidenav uk-slidenav-contrast uk-slidenav-next" data-uk-slideshow-item="next" style="color: rgba(255,255,255,0.4)"></a>
    </div>

    <h3>推荐教程</h3>

    <div class="uk-margin uk-clearfix">
        <div style="float:left">
            <a href="/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000" target="_blank"><img src="/files/attachments/0014355670304100cdaa4e7e651474d9672ed73797378bd000/m" /></a>
        </div>
        <div class="uk-margin" style="margin-left:20px; float:left">
            <h3><a href="/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000" target="_blank">JavaScript教程</a></h3>
            <p>JavaScript全栈教程</p>
        </div>
    </div>

    <div class="uk-margin uk-clearfix">
        <div style="float:left">
            <a href="/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000" target="_blank"><img src="/files/attachments/001431608955727f25be118770e460fad1296261e01213d000/m" /></a>
        </div>
        <div class="uk-margin" style="margin-left:20px; float:left">
            <h3><a href="/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000" target="_blank">Python教程</a></h3>
            <p>小白的Python新手教程</p>
        </div>
    </div>

    <div class="uk-margin uk-clearfix">
        <div style="float:left">
            <a href="/wiki/0013739516305929606dd18361248578c67b8067c8c017b000" target="_blank"><img src="/files/attachments/001385348516246a18bd54b498f4c74b694624d67f02fa9000/m" /></a>
        </div>
        <div class="uk-margin" style="margin-left:20px; float:left">
            <h3><a href="/wiki/0013739516305929606dd18361248578c67b8067c8c017b000" target="_blank">Git教程</a></h3>
            <p>史上最浅显易懂的Git教程</p>
        </div>
    </div>
{% endblock %}

{% block sidebar_right_content %}

<div class="uk-margin">
    <h3>{{ _('Recent Articles') }}</h3>
    <ul class="uk-nav">
        {% for a in recentArticles %}
        <li><a href="/article/{{ a.id }}" target="_blank">{{ a.name }}</a></li>
        {% endfor %}
    </ul>
</div>

{% endblock %}
